//
//  UserAllBuyMiddleTableViewCell.m
//  EasyBuy
//
//  Created by apple on 12-10-20.
//  Copyright (c) 2012年 shen donghao. All rights reserved.
//

#import "UserAllBuyMiddleTableViewCell.h"

@implementation UserAllBuyMiddleTableViewCell

- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        // Initialization code
        UILabel *buytag = [[UILabel alloc] initWithFrame:CGRectMake(5, 0, 105, 26)];
        buytag.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"tag"]];
        buytag.font = [UIFont systemFontOfSize:15];
        buytag.text = @"    Ta的宝贝";
        [self addSubview:buytag];
        [buytag release];
        
        buyConut = [[UILabel alloc] initWithFrame:CGRectMake(210, 0, 100, 26)];
        buyConut.backgroundColor = [UIColor clearColor];
        buyConut.font = [UIFont systemFontOfSize:15];
        
        [self addSubview:buyConut];
        [buyConut release];
        
        UIImageView *buyTag = [[UIImageView alloc] initWithFrame:CGRectMake(290, 5, 20, 20)];
        buyTag.image = [UIImage imageNamed:@"3"];
        [self addSubview:buyTag];
        [buyTag release];
    }
    return self;
}

- (void)setMiddleCellInfo:(NSDictionary *)dictionary{
    _userBuyCount = 36;
    [self setMiddleCellInfoData];
}

-(void)setMiddleCellInfoData{
    buyConut.text = [NSString stringWithFormat:@"%d个宝贝",_userBuyCount];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated
{
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
